
#---------------------------------------------------+
# Template: J3.02.P09.T05S
# #
# # This Perl module is used for RLI 11992 Testing for Oversubscription using Oceanus SCB
# # Author: Dharshana Eswaran (deswaran@juniper.net)
# # %SYN%: Test Oversubscription using OCEANUS SCB
# # %URL%: http://systest.juniper.net/feature_testplan/14459  
# # %REV%: Script revision is tracked by $VERSION found below.
# #        Note: script_template requires the following files:
# #                - 113_Oceanus_11992_Oversubscription.pm
# # %DESCR%: RLI 11992  Test oversubscription - First Test case tests the traffic bandwidth distribution by offline/online each fabric planes.
# #          For Second Test case, Since we cannot verify fabric drops by oversubscribing the total fabric bandwidth limit with the current hardware limitaion,this testcase is intent to observe fabric drops due to several planes are offline.
# #
# #
# #=====================================================================================



x-show-log 1;
#x-use-cached-params 1;
x-log-to-stdout 1;
#x-log-level "trace";
#x-command-log-level "trace";
x-command-log-level "info";
x-response-log-level "info";

x-log-header  1;
x-log-ti-verbose 1;
x-no-postmortem 1;
x-no-base-config-cleanup 0;
x-no-commit-on-cleanup 1;
# x-no-os-version-chk 1;
#x-no-setup-interfaces 1;
x-no-check-interface-status 1;
x-no-check-interface-ping 1;
#x-sleep-interval-after-test-config 30;
#x-setup-only 1;
#x-test-only 1;
#x-postmortem-always 1;
x-no-config-restore-on-exit 0;
x-log-level "trace";
x-command-log-level "trace";
x-response-log-level "trace";

x-set-user-init                   "&Testsuites::EABU_REG::LIB::Util::configure_hub";
x-my-hub-config-file              "/volume/labtools/lib/Testsuites/EABU_REG/LIB/hubconfig.params";
x-set-user-close                  "&Testsuites::EABU_REG::LIB::Util::unconfigure_hub";


x-timeout-commit-cleanup 100;
x-timeout-commit-test-config 100;
x-timeout-restore-config 100;
#x-no-run-set-user-cleanup 1;
#x-no-run-set-user-configs 1;
#x-no-run-set-user-chk-status 1;
x-no-run-set-user-postmortem 1;
#x-no-run-set-user-restore 1;   # true(1) | false(0)

x-set-user-configs                      "&Testsuites::Infrastructure::Chassisd::Oceanus::Oceanus_Fabric_BW_Ixia::basic_config";
#

x-test-topology "
  RT_NAME         R0_NAME              RT_NAME
     RT ------------ R0 ------------------RT
";

 
x-testcase-001 (
   "x-is-run"                 1
   "x-descr"                  "BASIC:TC 5.1.4  Test Fabric Bandwith oversubscription line rate, mesh traffic, expect no fabric packet loss "
   "x-cmd"		      "&Testsuites::Infrastructure::Chassisd::Oceanus::Oceanus_Fabric_BW_Ixia::testcase_5_1_1_1_4_Fabric_BW"
   "x-descr-long"             "TC 5.1.4   Test oversubscription - Tests oversubscription by Offline/Online Planes "
   "x-reset-config"           1
   "x-args"                   ( "BW => 90% , PACKET_SIZE => 512, sleep=>600, expect_rx_drop=>1 " )    
"x-cmd-on-fail"             "&Testsuites::Infrastructure::Chassisd::Oceanus::Oceanus_Fabric_BW_Ixia::template_user_postmortem"

);



r0 {
    x-dut 1;
    x-dual-re 1;
    system {
        model (or "mx960" "mx480");
    }
    interfaces { 
                link1 { 
                        #ingress1 traffic : Hyperion 
                        type (and "et" (or "MPC3" "MPC3E"));
                        x-ip "223.1.1.1/30";
                        x-ping-check-options "omit";}
                link2 { 
                       #ingress2 traffic : Hyperion
			type (and "et" (or "MPC3" "MPC3E"));
                        x-ip "223.1.2.1/30"; 
                        x-ping-check-options "omit";}  
                link3 { 
                       #egress traffic : Hyperion 
			type ( and "et" (or "MPC3" "MPC3E"));
                        x-ip "223.1.4.1/30"; 
                        x-ping-check-options "omit";}  
              } 
  }

rt {
      system { 
	      make "ixia";
	      x-ixia-pkg "Ixia_NG";
 #           x-version "6.10.750.5";
              }
      interfaces { 
                link1{
                        x-ip "223.1.1.2/30";
		        x-type "fiber"; 
                     } 
                link2 {
                        x-ip "223.1.2.2/30";
                        x-type "fiber";
		       }
   
                link3 {
                        x-ip "223.1.3.2/30";
	                x-type "fiber";
                      } 
                link4 {
                        x-ip "223.1.4.2/30";
		        x-type "fiber"; 
                       } 
      } 
    }



x-my-tcl-server-port "8009";

 h0 {
      x-no-os-get-version             1;
	  	 
     system {
         make "ixia";
         model "AppServer";
#         x-version "6.10.750.5";
            }
     interfaces { } 

 }
